

export function getItem(key) {
    const res = sessionStorage.getItem(key)
    if (res) {
        if (typeof res === "string") {
            return res
        } else {
            return JSON.parse(res)
        }

    } else {
        setItem('token', '')
        return ''
    }

}

export function setItem(key, value) {
    if (typeof value === 'string') {
        sessionStorage.setItem(key, value)
    } else {
        sessionStorage.setItem(key, JSON.stringify(value))
    }

}


export function removeItem(key) {
    sessionStorage.removeItem(key)
}